package com.jeesite.modules.exam.score.vo;

import com.alibaba.fastjson.JSONArray;
import com.jeesite.common.service.ServiceException;
import com.jeesite.modules.exam.assessment.entity.DcSupExamInfo;
import com.jeesite.modules.exam.notice.entity.DcSupExamNotice;
import com.jeesite.modules.exam.quota.entity.DcSupExamQuotaAdd;
import com.jeesite.modules.exam.quota.entity.DcSupExamSumQuota;
import com.jeesite.modules.exam.quota.entity.DcSupExamSumQuotaInfo;
import com.jeesite.modules.exam.score.entity.DcSupExamScore;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class DcSupExamVo {
    //1未确认  2已确认未提交 3 已提交
    private String showSubView;
    private String quotaId;
    private String examId;
    private String exameOrg;
    private String fileUploadIds;
    private String dcSupExamSumQuotaDtoListStr;
    private String dcSupExamQuotaAddListStr;
    private DcSupExamInfo dcSupExamInfo;
    private DcSupExamScore dcSupExamScore;
    private DcSupExamNotice dcSupExamNotice;
    private List<DcSupExamSumQuotaInfo> dcSupScoreList;
    private List<DcSupExamQuotaAdd> dcSupExamQuotaAddList;

    public void setDcSupExamSumQuotaDtoListStr(String dcSupExamSumQuotaDtoListStr) {
        this.dcSupExamSumQuotaDtoListStr = dcSupExamSumQuotaDtoListStr;
        try {
            this.dcSupScoreList= JSONArray.parseArray(dcSupExamSumQuotaDtoListStr, DcSupExamSumQuotaInfo.class);
        } catch (Exception e) {
            e.printStackTrace();
            throw new ServiceException("系统异常！");
        }
    }

    public void setDcSupExamQuotaAddListStr(String dcSupExamQuotaAddListStr) {
        this.dcSupExamQuotaAddListStr = dcSupExamQuotaAddListStr;
        try {
            this.dcSupExamQuotaAddList=JSONArray.parseArray(dcSupExamQuotaAddListStr,DcSupExamQuotaAdd.class);
        } catch (Exception e) {
            e.printStackTrace();
            throw new ServiceException("系统异常！");
        }
    }
}
